#include"mystdio.h"
#include<stdlib.h>
#include<string.h>
int main()
{

    // FILE* fp = fopen("myfiletest.txt","a");
    // const char* str = "fdsfadsfkdsajfkladsfdsafsda";
    // fwrite(str,strlen(str),1,fp);
    // sleep(11);
    // fclose(fp);

    myFILE* fp = my_fopen("myfiletest.txt","a");
    if(fp == NULL)
    {
        printf("open file error\n");
        return -1;
    }
    printf("open file success\n");
    
    char * str = "hello worldfsdfdsfsdfsdfds";

     
    my_fwrite(fp,str,strlen(str));
    printf("write success!");

    sleep(6);
    my_fclose(fp);
    printf("close file success\n");
    return 0;
}

